<?php

namespace Fang\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
*子角色赋予权限
*@ORM\Entity
*@ORM\Table(name="subrolespermission")
**/
class SubrolesPermission
{
  /**
  *@ORM\Column(type="integer")
  *@ORM\Id
  *@ORM\GeneratedValue(strategy="AUTO")
  **/
  private $id;
  /**
  *关联子角色表
  *@ORM\ManyToOne(targetEntity="Subroles")
  *@ORM\JoinColumn(name="srid", referencedColumnName="srid")
  *@ORM\Column(type="integer")
  **/
  private $srid;
  /**
  *关联权限
  *@ORM\ManyToOne(targetEntity="Permission")
  *@ORM\JoinColumn(name="pid", referencedColumnName="pid")
  *@ORM\Column(type="integer")
  **/
  private $pid;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set srid
     *
     * @param integer $srid
     * @return SubrolesPermission
     */
    public function setSrid($srid)
    {
        $this->srid = $srid;

        return $this;
    }

    /**
     * Get srid
     *
     * @return integer 
     */
    public function getSrid()
    {
        return $this->srid;
    }

    /**
     * Set pid
     *
     * @param integer $pid
     * @return SubrolesPermission
     */
    public function setPid($pid)
    {
        $this->pid = $pid;

        return $this;
    }

    /**
     * Get pid
     *
     * @return integer 
     */
    public function getPid()
    {
        return $this->pid;
    }
}
